package common;

import java.io.Serializable;

public class Subscription implements Serializable {

	private static final long serialVersionUID = 1L;
	public int numSubscribers = 0;
	public String topic;

	public Subscription(String topic, int numSubscribers) {
		super();
		this.topic = topic;
		this.numSubscribers = numSubscribers;
	}

	@Override
	public boolean equals(Object other) {
		if (other instanceof Subscription) {
			Subscription otherSubscription = (Subscription) other;
			if (this.topic.equals(otherSubscription.topic))
				return true;
			else
				return false;
		} else {
			return super.equals(other);
		}
	}
}
